import 'package:flutter/material.dart';
import 'ListComponent.dart';
import 'basicsWidgets.dart';

void main() => runApp(new EEApp());

class EEApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        // primarySwatch: Colors.greenAccent,
        primaryColor: Colors.amber
      ),
      debugShowCheckedModeBanner: true,
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {

    var items = [
      ListItem(title: "Basics", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Material Components", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Cupertino (iOS-style widgets)", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Layout", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Text", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Assets, Images, and Icons", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Input", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Animation and Motion", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Interaction Models", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Styling", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Painting and effects", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Async", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Scrolling", 
        builder: (BuildContext context) => BasicsWidgets()),
      ListItem(title: "Accessibility", 
        builder: (BuildContext context) => BasicsWidgets()),
    ];
  
    return ListComponent(data: ListComponentData(title: "Home", items: items));
  }
}

